import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    descrip: '',
    edit: false,
    dialogVisible3: false,
    dialogVisible4: false,
    dialogVisible5: false,
    showPathT: false,
    showBufferT: false,
    showDestinationT: false,
    drawer: false,
    token: localStorage.getItem('token'),
    power: '',
  },
  mutations: {
    writeToken(state) {
      state.token = '123456'
    },

    drawerTrue(state) {
      state.drawer = true
    },

    drawerFalse(state) {
      state.drawer = false
    },

    showPathTrue(state) {
      state.showPathT = true
    },

    showPathFalse(state) {
      state.showPathT = false
    },

    showDestinationTrue(state) {
      state.showDestinationT = true
    },

    showDestinationFalse(state) {
      state.showDestinationT = false
    },

    showBufferTrue(state) {
      state.showBufferT = true
    },

    showBufferFalse(state) {
      state.showBufferT = false
    },

    edittrue(state) {
      // state.edit=true
      state.dialogVisible3 = true
    },
    editfalse(state) {
      // state.edit=false
      state.dialogVisible3 = false
    },

    edittrue2(state) {
      // state.edit=true
      state.dialogVisible4 = true
    },
    editfalse2(state) {
      // state.edit=false
      state.dialogVisible4 = false
    },

    edittrue3(state) {
      state.dialogVisible5 = true
    },

    editfalse3(state) {
      state.dialogVisible5 = false
    },
  },
  actions: {},
  modules: {},
})
